package com.xiaozhichao.javaapi.base.jvm;

import org.junit.Test;

/**
 * 类加载测试
 */
public class LoadingTest {

    public static void main(String[] args) {
        String a = new String("sss");

        System.out.println(a.length());
    }

    @Test
    public void test1(){
        System.out.println("========Child ChildStaticFinalInt========");
        System.out.println(Child.ChildStaticFinalInt);
        /*System.out.println("========Child ChildStaticInt========");
        System.out.println(Child.ChildStaticInt);
        System.out.println("========Parent ParentStaticInt========");
        System.out.println(Parent.ParentStaticInt);
        System.out.println("========Parent ParentStaticFinalInt========");
        System.out.println(Parent.ParentStaticFinalInt);
        System.out.println("========GreParent GreParentStaticFinalInt========");
        System.out.println(Parent.GreParentStaticFinalInt);*/
        System.out.println("========GreParent GreParentStaticInt========");
        System.out.println(Parent.GreParentStaticInt);
    }

    @Test
    public void test2(){
        System.out.println("========Child ChildStaticInt========");
        System.out.println(Child.ChildStaticInt);
    }
}
